﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using IDML.Web.Common;


namespace IDML.Web.Modules.Reports
{
    public partial class rptPatientTest : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int PatientId=2;
                int TestId = 43;
                BindReport(PatientId, TestId);
            }

        }

        private void BindReport(int patientId,int testId)
        {
            ReportHelper report = new ReportHelper();
            SqlParameter[] sqlParams = new SqlParameter[] {
         new SqlParameter("@PatientId", patientId) ,
          new SqlParameter("@TestId", testId) ,
       
      };


            string ReportDataSource = "DataSet1";
            bool bind = report.CreateReport("PatientTest_Report", sqlParams, ref ReportViewer1, ReportDataSource);



            if (bind)
            {
                ReportViewer1.Visible = true;
            }
        }
    }
}